package org.example.wework.exception;

import io.appium.java_client.AppiumDriver;

import java.util.ArrayList;
import java.util.List;

public class ExceptionHandler {

    private final static ArrayList<ExceptionHandler> exceptionHandlers = new ArrayList<ExceptionHandler>();
    public static int retryMax = 3;
    public static int retry = 0;

    public Boolean isHit(String pageSource) {
        return false;
    }

    public void handle(AppiumDriver driver) {

    }

    public static List<ExceptionHandler> getAllExceptionHandler() {

        if (exceptionHandlers.size() == 0) {
            exceptionHandlers.add(new JumpOutExceptionHandler());
        }

        return exceptionHandlers;
    }

}
